#ifndef _SnatchItem_h__
#define _SnatchItem_h__

#include "Global.h"





class SnatchItem
	: public CCNode
	, public CCBMemberVariableAssigner
	, public CCBSelectorResolver
	, public CCNodeLoaderListener
	, public ViewBase
{
public:
	CCB_STATIC_NEW_AUTORELEASE_OBJECT_WITH_INIT_METHOD(SnatchItem, create);

	SnatchItem(void);
	~SnatchItem(void);

	virtual SEL_MenuHandler onResolveCCBCCMenuItemSelector(CCObject * pTarget, CCString * pSelectorName);
	virtual SEL_CCControlHandler onResolveCCBCCControlSelector(CCObject * pTarget, CCString * pSelectorName);
	virtual bool onAssignCCBMemberVariable(CCObject * pTarget, CCString * pMemberVariableName, CCNode * pNode);
	virtual void onNodeLoaded(CCNode * pNode, CCNodeLoader * pNodeLoader);
	bool init();
	virtual void refresh();
	void onEnter();
	void onExit();
protected:
	CCLabelTTF* mName;
	CCLabelTTF* mLevel;
	CCLabelTTF* mAttack;
	CCLabelTTF* mDefense;
	void _onNotification(CCObject* object);
	void onChallengeBtnClick(CCObject * pSender, CCControlEvent pCCControlEvent);
	
};

#endif